/*
 * Copyright (c) 2016 moondev.cn
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package cn.moondev.moonlog.example.moonlog.monitor.entity;

import java.io.Serializable;

/**
 *
 */
public class SqlMonitor implements Serializable{

	private static final long serialVersionUID = -4521302343697412366L;
	
	private long id;
	/**
	 * 系统名称
	 */
	private String sysname;
	/**
	 * 业务url
	 */
	private String sql;
	/**
	 * 日志唯一编码，每次请求的日志都包含此编码
	 */
	private String uuid;
	/**
	 * 执行日期
	 */
	private String invokeDate;
	/**
	 * 执行耗时，单位毫秒
	 */
	private int executedTime;
	/**
	 * 执行时间
	 */
	private long invokeTime;
	
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public String getSysname() {
		return sysname;
	}
	public void setSysname(String sysname) {
		this.sysname = sysname;
	}
	public String getSql() {
		return sql;
	}
	public void setSql(String sql) {
		this.sql = sql;
	}
	public String getUuid() {
		return uuid;
	}
	public void setUuid(String uuid) {
		this.uuid = uuid;
	}
	public String getInvokeDate() {
		return invokeDate;
	}
	public void setInvokeDate(String invokeDate) {
		this.invokeDate = invokeDate;
	}
	public int getExecutedTime() {
		return executedTime;
	}
	public void setExecutedTime(int executedTime) {
		this.executedTime = executedTime;
	}
	public long getInvokeTime() {
		return invokeTime;
	}
	public void setInvokeTime(long invokeTime) {
		this.invokeTime = invokeTime;
	}
	@Override
	public String toString() {
		return "SqlMonitor [id=" + id + ", sysname=" + sysname + ", sql=" + sql + ", uuid=" + uuid + ", invokeDate="
				+ invokeDate + ", executedTime=" + executedTime + ", invokeTime=" + invokeTime + "]";
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (id ^ (id >>> 32));
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		SqlMonitor other = (SqlMonitor) obj;
		if (id != other.id)
			return false;
		return true;
	}
}
